/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class BathroomMirror {
    static categoryCode = '010060017';

    static categoryName = '浴室镜';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return BathroomMirror.categoryCode;
    }

    get categoryName() {
        return BathroomMirror.categoryName;
    }

    getBrightness(params) {
        return command({
            method: 'getBrightness',
            methodId: 'pGoxGSqo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDefoggerSwitch(params) {
        return command({
            method: 'getDefoggerSwitch',
            methodId: 'pgh07Jez',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightSwitch(params) {
        return command({
            method: 'getLightSwitch',
            methodId: 'pDrhtT7W',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'p1vZONSR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBrightness(params) {
        return command({
            method: 'setBrightness',
            methodId: 'peH39rHb',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDefoggerSwitch(params) {
        return command({
            method: 'setDefoggerSwitch',
            methodId: 'pZgRqLz1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightSwitch(params) {
        return command({
            method: 'setLightSwitch',
            methodId: 'pUPQoZKk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAXzdUq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default BathroomMirror;
